******Code for replication 'Zorro versus Covid-19: fighting the pandemic with face masks'


*** Tables 1 to 3 and panel data: pkease use 'maskspanel2.dta' data (global sample)
*** Tables 4 and 5 and cross-sectional data: please use 'crosssectionmask.dta' data
 
**** To replicate Table 1

xtmg casepop l1casepop  l14casepop l7masksN d, robust
xtmg casepop l1casepop  l14casepop l14masksN d, robust
xtmg casepop l1casepop  l14casepop l28masksN d, robust
xtmg casepop l1casepop  l14casepop l42masksN d, robust
 
****Table 2

xtmg deathpop l1deathpop l14deathpop l14casepop l14masksN d, robust
xtmg deathpop l1deathpop l14deathpop l14casepop l21masksN d, robust
xtmg deathpop l1deathpop l14deathpop l14casepop l28masksN d, robust
xtmg deathpop l1deathpop l14deathpop l14casepop l35masksN d, robust
xtmg deathpop l1deathpop l14deathpop l14casepop l42masksN d, robust
xtmg deathpop l1deathpop l14deathpop l14casepop l56masksN d, robust

****Table 3

xtmg casepop l1casepop l14casepop l14masksN  l14new_tests_per_thousand d , robust
outreg2 using myreg.tex, replace
xtmg casepop l1casepop l14casepop l14masksN  l14stringent d , robust
outreg2 using myreg, tex(frag)
xtmg deathpop l1deathpop l14deathpop l14casepop l14masksN  l14new_tests_per_thousand d , robust
outreg2 using myreg, tex(frag)
xtmg deathpop l1deathpop l14deathpop l14casepop l14masksN  l14stringent d , robust
outreg2 using myreg, tex(frag)


****Table 4

reg  masksfinal ldensity2017 lco2014 lco2014sq, robust

reg  masksfinal ldensity2017 lco2014 lco2014sq lgdp17, robust

reg  masksfinal ldensity2017 lco2014 lco2014sq gov_effectiveness_2018 , robust

reg  masksfinal ldensity2017 lco2014 lco2014sq urban_percentage_2018 , robust

reg  masksfinal ldensity2017 lco2014 lco2014sq stringency, robust


*****Table5

reg  masksfinal ldensity2017 lco2014 lco2014sq stringency diabete age652017 cumulatedcases0707pop100 lgdp2017, robust
outreg2 using myreg.tex, replace
reg  masksfinal ldensity2017 lco2014 lco2014sq stringency diabete age652017 cumulatedcases0707pop100 gov_effectiveness_2018 , robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 altruism stringency, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 tolerance tolerancesq, robust
outreg2 using myreg, tex(frag)



***** No effect of Schooling and Pisa

reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 stringency school2017, robust

reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 stringency pisa, robust

****overweight effect

reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 diabete pct_overweight, robust




**** Additional regressions



reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100
outreg2 using myreg.tex, replace
reg  masksfinal ldensity2017 lco2014 lco2014sq age652017, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq stringency diabete age652017 cumulatedcases0707pop100 lgdp2017, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 altruism stringency, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 tolerance tolerancesq, robust
outreg2 using myreg, tex(frag)

reg  masksfinal ldensity2017 lco2014 lco2014sq stringency diabete age652017, robust
reg  masksfinal ldensity2017 lco2014 lco2014sq stringency diabete age652017 cumulatedcases0707pop lgdp2017 , robust
reg  masksfinal ldensity2017 lco2014 lco2014sq stringency diabete age652017 cumulatedcases0707pop gov_effectiveness
> _2018 , robust



*****SI


reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 stringency
outreg2 using myreg.tex, replace
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 age652017, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 diabete, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 stringency lgdp17, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 stringency gov_effectiveness_2018 , robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 altruism stringency, robust
outreg2 using myreg, tex(frag)
reg  masksfinal ldensity2017 lco2014 lco2014sq cumulatedcases0707pop100 tolerance tolerancesq, robust
outreg2 using myreg, tex(frag)



**** Partial regressions, count on July, 15, 2020

reg  masksfinal ldensity2017, robust
outreg2 using myreg.tex, replace
reg  masksfinal lco2014 lco2014sq, robust
outreg2 using myreg, tex(frag)
reg  masksfinal stringency, robust
outreg2 using myreg, tex(frag)
reg  masksfinal diabete diabetesq, robust
outreg2 using myreg, tex(frag)
reg  masksfinal lgdp17, robust
outreg2 using myreg, tex(frag)
reg  masksfinal age652017, robust
outreg2 using myreg, tex(frag)

reg  masksfinal gov_effectiveness_2018, robust
outreg2 using myreg.tex, replace
reg  masksfinal pct_overweight, robust
outreg2 using myreg, tex(frag)
reg  masksfinal altruism, robust
outreg2 using myreg, tex(frag)
reg  masksfinal tolerance tolerancesq, robust
outreg2 using myreg, tex(frag)
reg masksfinal cumulatedcases0707pop, robust
outreg2 using myreg, tex(frag)
reg masksfinal cumulatedcases0906pop, robust
outreg2 using myreg, tex(frag)

**** Partial regressions, count on April, 23-25, 2020

reg  masksdebutN ldensity2017, robust
outreg2 using myreg.tex, replace
reg  masksdebutN lco2014 lco2014sq, robust
outreg2 using myreg, tex(frag)
reg  masksdebutN stringency, robust
outreg2 using myreg, tex(frag)
reg  masksdebutN diabete diabetesq, robust
outreg2 using myreg, tex(frag)
reg  masksdebutN lgdp17, robust
outreg2 using myreg, tex(frag)
reg  masksdebutN age652017, robust
outreg2 using myreg, tex(frag)

reg  masksdebutN gov_effectiveness_2018, robust
outreg2 using myreg.tex, replace
reg  masksdebutN pct_overweight, robust
outreg2 using myreg, tex(frag)
reg  masksdebutN altruism, robust
outreg2 using myreg, tex(frag)
reg  masksdebutN tolerance tolerancesq, robust
outreg2 using myreg, tex(frag)
reg masksdebutN cumulatedcases0707pop, robust
outreg2 using myreg, tex(frag)
reg masksdebutN cumulatedcases0906pop, robust
outreg2 using myreg, tex(frag)

******

reg  masksfinal gov_effectiveness_2018 goveffsq, robust

reg  masksfinal ldensity2017 lco2014 lco2014sq diabete gov_effectiveness_2018 goveffsq, robust

reg  masksfinal ldensity2017 lco2014 lco2014sq diabete age652017, robust

reg  masksfinal ldensity2017 lco2014 lco2014sq diabete lgdp17, robust




****strong correlation***
pwcorr lgdp17 gov_effectiveness_2018

pwcorr masksfinal ldensity2017 urban_percentage_2018 lco2014 diabete gov_effectiveness_2018 stringency age652017 lgdp17 altruism tolerance polity2

twoway scatter masksfinal tolerance || qfit masksfinal tolerance




*****Robustness Add stringency to control other mitigation measures

xtmg casepop l1casepop l14casepop l7masksN  l7stringent d , robust
outreg2 using myreg.tex, replace
xtmg casepop l1casepop l14casepop l14masksN  l14stringent d , robust
outreg2 using myreg, tex(frag)
xtmg casepop l1casepop l14casepop l28masksN  l28stringent d , robust
outreg2 using myreg, tex(frag)
xtmg casepop l1casepop l14casepop l42masksN  l42stringent d , robust 
outreg2 using myreg, tex(frag)

xtmg deathpop l1deathpop l14deathpop l14casepop l7masksN  l7stringent d , robust
outreg2 using myreg.tex, replace
xtmg deathpop l1deathpop l14deathpop l14casepop l14masksN  l14stringent d , robust
outreg2 using myreg, tex(frag)
xtmg deathpop l1deathpop l14deathpop l14casepop l28masksN  l28stringent d , robust
outreg2 using myreg, tex(frag)
xtmg deathpop l1deathpop l14deathpop l14casepop l42masksN l42stringent d , robust 
outreg2 using myreg, tex(frag)


****European countries case:add 'ifi' with corresponding id
 
 xtmg deathpop l1deathpop l14deathpop l14casepop l28masksN d if id==8 | id==10 | id==13 | id==25 | id==26 | id==27 | id==74 
|id==47 | id==52| id==83| id== 94| id== 95 | id==96  | id==32  | id==35  | id==36  | id==40  | id==43  | id==44  | id==84  
| id==87, robust


****Figure 1
xtmg casepop l1casepop  l14casepop l7masksN d, robust
xtmg casepop l1casepop  l14casepop l8masksN d, robust
xtmg casepop l1casepop  l14casepop l9masksN d, robust
xtmg casepop l1casepop  l14casepop l10masksN d, robust
xtmg casepop l1casepop  l14casepop l11masksN d, robust
xtmg casepop l1casepop  l14casepop l12masksN d, robust
xtmg casepop l1casepop  l14casepop l13masksN d, robust
xtmg casepop l1casepop  l14casepop l14masksN d, robust
xtmg casepop l1casepop  l14casepop l15masksN d, robust
xtmg casepop l1casepop  l14casepop l16masksN d, robust
xtmg casepop l1casepop  l14casepop l17masksN d, robust
xtmg casepop l1casepop  l14casepop l18masksN d, robust
xtmg casepop l1casepop  l14casepop l19masksN d, robust
xtmg casepop l1casepop  l14casepop l20masksN d, robust
xtmg casepop l1casepop  l14casepop l21masksN d, robust
xtmg casepop l1casepop  l14casepop l22masksN d, robust
xtmg casepop l1casepop  l14casepop l23masksN d, robust
xtmg casepop l1casepop  l14casepop l24masksN d, robust
xtmg casepop l1casepop  l14casepop l25masksN d, robust
xtmg casepop l1casepop  l14casepop l26masksN d, robust
xtmg casepop l1casepop  l14casepop l27masksN d, robust
xtmg casepop l1casepop  l14casepop l28masksN d, robust
xtmg casepop l1casepop  l14casepop l29masksN d, robust
xtmg casepop l1casepop  l14casepop l30masksN d, robust
xtmg casepop l1casepop  l14casepop l31masksN d, robust
xtmg casepop l1casepop  l14casepop l32masksN d, robust
xtmg casepop l1casepop  l14casepop l33masksN d, robust
xtmg casepop l1casepop  l14casepop l34masksN d, robust
xtmg casepop l1casepop  l14casepop l35masksN d, robust
xtmg casepop l1casepop  l14casepop l36masksN d, robust
xtmg casepop l1casepop  l14casepop l37masksN d, robust
xtmg casepop l1casepop  l14casepop l38masksN d, robust
xtmg casepop l1casepop  l14casepop l39masksN d, robust
xtmg casepop l1casepop  l14casepop l40masksN d, robust
xtmg casepop l1casepop  l14casepop l41masksN d, robust
xtmg casepop l1casepop  l14casepop l42masksN d, robust






